How A Migrating Gas Giant Affects The Growth Of Rocky Planets